package extlib;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class RWFile {

    public static void writeTextToFile(String texttowrite, String fileadress) {
        try {
            FileWriter fw = new FileWriter(fileadress, false);
            BufferedWriter output = new BufferedWriter(fw);
            output.write(texttowrite);
            output.flush();
            output.close();
        } catch (IOException ioe) {
            System.out.println("error " + ioe);
        }
    }
    ///home/me/Documents/ToWindows/matrix1.txt

//    public static void writeTextToFile(int[] tab) {
//        String ret = "";
//        for (int i = 2 ; i <= PhiN.entiermax ; i++) {
//            ret += i + "," + tab[i] + "\n";
//        }
//        writeTextToFile(ret, "/home/me/Documents/ToWindows/phi1.txt");
//    }
}
